-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support customize clear icon #660
Conversation
kiner-tang
commented
Jul 25, 2023
- 📝 [RFC] Unify allowClear api for clearable component ant-design/ant-design#43582
- Allow Custom Clear Icon for DatePicker, Input.Password and TreeSelect ant-design/ant-design#43495
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov Report
@@ Coverage Diff @@
## master #660 +/- ##
=======================================
Coverage 99.04% 99.05%
=======================================
Files 55 56 +1
Lines 2416 2426 +10
Branches 716 720 +4
=======================================
+ Hits 2393 2403 +10
Misses 21 21
Partials 2 2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
src/hooks/useAllowClear.tsx
Outdated
e.preventDefault(); | ||
e.stopPropagation(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里可以去掉吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是现有逻辑,去掉后不知道会不会导致一些不可意料的问题
src/hooks/useAllowClear.tsx
Outdated
clearIcon: ( | ||
<span | ||
onMouseDown={(e) => { | ||
e.preventDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preventDefault 有用么?有可能导致用户自定义的 icon 事件失效
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这是现有逻辑,去掉后不知道会不会导致一些不可意料的问题